Hide locked users' profiles from the non-admin people index#1489
Merged
Conversation
Collaborator
|
I wrote up this issue before seeing your PR. #1490 |
4 tasks
5842ef5 to
29614f7
Compare
29614f7 to
4a9212b
Compare
42ab70f to
9dbb9c9
Compare
Add a where_user_not_locked Person scope and chain it onto the non-admin relation_scope so that profiles whose user account is locked are excluded. People with no user record are still included. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4a9212b to
a4bb4e2
Compare
4 tasks
jmilljr24
pushed a commit
that referenced
this pull request
May 20, 2026
Add a where_user_not_locked Person scope and chain it onto the non-admin relation_scope so that profiles whose user account is locked are excluded. People with no user record are still included. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
jmilljr24
added a commit
that referenced
this pull request
Jun 5, 2026
* add pay gem * pay gem migrations * add pay_customer to person * create allocations migration * change payments to sti * add refunds migration * fix migration * update models to use allocations * add allocation index with cash and check payment form * create allocation form * us turbo stream replace * change payment totals to allocations_sum * clean up new payment form * add stimulus selection for payer typer * fix toggle of payer type search * fix form style * add dollars to UI * add dollars to allocations and add payment index pagination * titlize payment type * display amount input with decimal * add allocated amount to payment * handle allocation payment transaction * allocate payments manually * add refunds to payments * show refunds and allocation source * add refund method * add revert of allocation * add event cost validation for allocation * add flash errors * show reverted reference * fix allocated amount update * change to amount remaining * update flash with remaining on payment * add stripe env * add stripe checkout * create payment when pay charge is paid * add stripe refund id to refunds * order payment lists newest first * fix amount cents remaning for new payments * refactor search type selector to be generic * add join scope to remote search concern * create payment seeds * add seed for unallocation * fix event create seed * add cursor to revert button * more refund query to controller * add search boxes for payments * fix search on amount remaining * fix dropdown toggle * add turbo frame results * exclude remove select input typing from auto submit * fix payment type select * fix new payment form type select * use turbo frame top for payment view link * remove redudant payment name * hard code stripe name * comments * fix check for nil on event allocation * rubocop * add turbo flash to allocations * add allocation validation * add search to allocations * fix turbo frame on allocation search * move search box columns * add placeholder for type select * clear search * check for outlet * justify end for clear filters buttons * use model card helper * clean up * Fix system notifications showing Oopsie error (#1488) * Fix system notifications showing "Oopsie!" by adopting lazy-load pattern The notifications index rendered data inline inside a turbo frame while also setting a src attribute to re-fetch the same data. If the redundant request failed, the turbo:frame-missing handler replaced the content with an error message. Aligns with the lazy-load pattern used by other controllers (stories, people, etc.) — skeleton on initial load, data fetched via turbo frame request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add turbo_frame: _top to links inside notifications turbo frame Links inside the notifications_results turbo frame were being intercepted by Turbo, which tried to load the target page inside the frame. The show page and polymorphic record pages don't contain a matching turbo frame, triggering the turbo:frame-missing handler and showing the "Oopsie!" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Bump vulnerable gems flagged by bundler-audit (#1495) Updates addressable, net-imap, nokogiri, rack, and rack-session to patched versions to clear CVE advisories from the scan_ruby CI job. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> * Bump actions/upload-artifact from 4 to 7 (#1485) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Hide locked users' profiles from the non-admin people index (#1489) Add a where_user_not_locked Person scope and chain it onto the non-admin relation_scope so that profiles whose user account is locked are excluded. People with no user record are still included. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> * create scholarship migration * add scholarship controller and model * add scholarship admin ui * add scholarship crud * remove event_reg_id from scholarship * change allocation heading * add discounts * change payment payer from polymorphic to person and/or organization * add all option to search payer type * schema * update nav buttons * move amount calc to model * clean up * allocation results break out of turbo frame * use results template * clean up index action on allocation * update reminder to work with payments * fix simple specs * remove feature flag * remove auto refund * rubocop * handle brakeman warnings * handle polymorphic paths for show * add tests * add allocation error message * validate greated than 0 payment * fix fully allocated regs * add tests * add scholarship recipient * add stripe checkout to event reg * handle payment for remaining cost * add payment comments * add amount remaining to source column * add stripe refunds * add refund specs * fix spec * spec --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: maebeale <maebeale@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR and why is this important?
How did you approach the change?
Person.where_user_not_lockedscope:left_joins(:user)so people with no user record are still included, then keeps only rows whereusers.locked_at IS NULL.where_user_not_lockedonto the non-admin branch ofPersonPolicy'srelation_scope, after the existingsearchable.with_active_affiliationsfiltersusers.locked_at IS NULLUI Testing Checklist
profile_is_searchable: true. Confirm that profile no longer appears on/people/peoplestill sees locked users' profilesAnything else to add?
/peopleyet. Keeping them split so the policy change and the visibility-filter change can be reviewed independently